﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Automobile.service.Common;
using Automobile.service.Model;
using Automobile.service.BLL;
using System.Data;
namespace Automobile.service.UI
{
    public partial class EmployeeAdd : System.Web.UI.Page
    {
        EmployeeBLL bll = new EmployeeBLL();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Unnamed1_Click(object sender, EventArgs e)
        {
            Employee es = new Employee();
            es.Employee_Name = this.Employee_Name.Text;
            es.Employee_Phone = this.Employee_Phone.Text;
            es.Employee_Pwd = this.Employee_Pwd.Text;
            es.Employee_Remark = this.Employee_Remark.Text;
            es.Employee_Addr = this.Employee_Addr.Text;
            es.Employee_State = this.RadioButton1.Checked ? 1 : 0;
            if (bll.Empoyee_Add(es) > 0)
            {
                Response.Write("修改成功");
                Response.Redirect("EmployeeShow.aspx");
            }
            else
            {
                Response.Write("修改失败");
            }
        }
    }
}